#ifndef _RENDER_INSTANCE_H_
#define _RENDER_INSTANCE_H_

#include "RenderMesh.h"


class RenderInstance
{
	// ID for the current shader being used by this instance
	int m_nShaderID;

	// ID for the current texture being used by this instance
	int m_nTextureID;

	// ID for the mesh being used by this instance
	int m_nMeshID;

	// Matrix for this instance
	D3DXMATRIX m_Transform;

public:
	// Default Constructor - Initialize data members to default, safe, values
	RenderInstance(void);

	// Constructor with params - Initialize data members according to the passed in parameters
	RenderInstance(int shaderID, int textureID, int meshID, float xPos = 0.0f, float yPos = 0.0f, float zPos = 0.0f);

	// Updates the Render Instance according to a certain behavior
	void Update(void);

	// Modifiers for the object matrix
	void Translate(float x, float y, float z);
	void Rotate(D3DXVECTOR3 axis, float angleDeg);
	void ResetPosition(float x, float y, float z);


	// Accessors for stuff
	__forceinline int GetShader(void) { return m_nShaderID; }
	__forceinline int GetTexture(void) { return m_nTextureID; }
	__forceinline int GetMesh(void) { return m_nMeshID; }
	__forceinline D3DXMATRIX& GetTransform(void) { return m_Transform; }

	// Mutators for stuff
	__forceinline void SetTexture(int texID) { m_nTextureID = texID; }
	__forceinline void SetShader(int shaderID) { m_nShaderID = shaderID; }
	__forceinline void SetMesh(int meshID) { m_nMeshID = meshID; }
};

#endif // _RENDER_INSTANCE_H_